curl --request POST \
--url https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Bola-Bola Ad campaign",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"exclusivityPrice": 123,
"bids": [
{
"target": {
"id": "p_8983",
"type": "product"
},
"triggers": [
{
"type": "category",
"value": {
"categoryId": "<string>"
}
}
]
}
],
"isActive": true,
"externalCampaignId": "<string>",
"isAutoTrigger": false,
"position": 1,
"walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing"
payload = {
"name": "Bola-Bola Ad campaign",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"exclusivityPrice": 123,
"bids": [
{
"target": {
"id": "p_8983",
"type": "product"
},
"triggers": [
{
"type": "category",
"value": { "categoryId": "<string>" }
}
]
}
],
"isActive": True,
"externalCampaignId": "<string>",
"isAutoTrigger": False,
"position": 1,
"walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Bola-Bola Ad campaign',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
exclusivityPrice: 123,
bids: [
{
target: {id: 'p_8983', type: 'product'},
triggers: [{type: 'category', value: {categoryId: '<string>'}}]
}
],
isActive: true,
externalCampaignId: '<string>',
isAutoTrigger: false,
position: 1,
walletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Bola-Bola Ad campaign',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'exclusivityPrice' => 123,
'bids' => [
[
'target' => [
'id' => 'p_8983',
'type' => 'product'
],
'triggers' => [
[
'type' => 'category',
'value' => [
'categoryId' => '<string>'
]
]
]
]
],
'isActive' => true,
'externalCampaignId' => '<string>',
'isAutoTrigger' => false,
'position' => 1,
'walletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing"
payload := strings.NewReader("{\n \"name\": \"Bola-Bola Ad campaign\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"exclusivityPrice\": 123,\n \"bids\": [\n {\n \"target\": {\n \"id\": \"p_8983\",\n \"type\": \"product\"\n },\n \"triggers\": [\n {\n \"type\": \"category\",\n \"value\": {\n \"categoryId\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"isActive\": true,\n \"externalCampaignId\": \"<string>\",\n \"isAutoTrigger\": false,\n \"position\": 1,\n \"walletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bola-Bola Ad campaign\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"exclusivityPrice\": 123,\n \"bids\": [\n {\n \"target\": {\n \"id\": \"p_8983\",\n \"type\": \"product\"\n },\n \"triggers\": [\n {\n \"type\": \"category\",\n \"value\": {\n \"categoryId\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"isActive\": true,\n \"externalCampaignId\": \"<string>\",\n \"isAutoTrigger\": false,\n \"position\": 1,\n \"walletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Bola-Bola Ad campaign\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"exclusivityPrice\": 123,\n \"bids\": [\n {\n \"target\": {\n \"id\": \"p_8983\",\n \"type\": \"product\"\n },\n \"triggers\": [\n {\n \"type\": \"category\",\n \"value\": {\n \"categoryId\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"isActive\": true,\n \"externalCampaignId\": \"<string>\",\n \"isAutoTrigger\": false,\n \"position\": 1,\n \"walletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"name": "Bola-Bola Ad campaign",
"marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exclusivityPrice": 123,
"chargeType": "DAILY",
"adFormat": "exclusive_listing",
"vendorId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isActive": true,
"externalCampaignId": "<string>",
"isAutoTrigger": false,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "9999-12-31T22:59:59.999999Z",
"bidType": "exclusive",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 1,
"walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}[BETA] Create exclusive listing campaign.
Endpoint to create exclusive listing campaigns and its respective bids.
Exclusive campaigns override auctions and are always shown by a fixed daily price.
curl --request POST \
--url https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Bola-Bola Ad campaign",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"exclusivityPrice": 123,
"bids": [
{
"target": {
"id": "p_8983",
"type": "product"
},
"triggers": [
{
"type": "category",
"value": {
"categoryId": "<string>"
}
}
]
}
],
"isActive": true,
"externalCampaignId": "<string>",
"isAutoTrigger": false,
"position": 1,
"walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing"
payload = {
"name": "Bola-Bola Ad campaign",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"exclusivityPrice": 123,
"bids": [
{
"target": {
"id": "p_8983",
"type": "product"
},
"triggers": [
{
"type": "category",
"value": { "categoryId": "<string>" }
}
]
}
],
"isActive": True,
"externalCampaignId": "<string>",
"isAutoTrigger": False,
"position": 1,
"walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Bola-Bola Ad campaign',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
exclusivityPrice: 123,
bids: [
{
target: {id: 'p_8983', type: 'product'},
triggers: [{type: 'category', value: {categoryId: '<string>'}}]
}
],
isActive: true,
externalCampaignId: '<string>',
isAutoTrigger: false,
position: 1,
walletId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Bola-Bola Ad campaign',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'exclusivityPrice' => 123,
'bids' => [
[
'target' => [
'id' => 'p_8983',
'type' => 'product'
],
'triggers' => [
[
'type' => 'category',
'value' => [
'categoryId' => '<string>'
]
]
]
]
],
'isActive' => true,
'externalCampaignId' => '<string>',
'isAutoTrigger' => false,
'position' => 1,
'walletId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing"
payload := strings.NewReader("{\n \"name\": \"Bola-Bola Ad campaign\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"exclusivityPrice\": 123,\n \"bids\": [\n {\n \"target\": {\n \"id\": \"p_8983\",\n \"type\": \"product\"\n },\n \"triggers\": [\n {\n \"type\": \"category\",\n \"value\": {\n \"categoryId\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"isActive\": true,\n \"externalCampaignId\": \"<string>\",\n \"isAutoTrigger\": false,\n \"position\": 1,\n \"walletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Bola-Bola Ad campaign\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"exclusivityPrice\": 123,\n \"bids\": [\n {\n \"target\": {\n \"id\": \"p_8983\",\n \"type\": \"product\"\n },\n \"triggers\": [\n {\n \"type\": \"category\",\n \"value\": {\n \"categoryId\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"isActive\": true,\n \"externalCampaignId\": \"<string>\",\n \"isAutoTrigger\": false,\n \"position\": 1,\n \"walletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.topsort.com/public/v1/campaign-service/campaigns/exclusive-listing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Bola-Bola Ad campaign\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"exclusivityPrice\": 123,\n \"bids\": [\n {\n \"target\": {\n \"id\": \"p_8983\",\n \"type\": \"product\"\n },\n \"triggers\": [\n {\n \"type\": \"category\",\n \"value\": {\n \"categoryId\": \"<string>\"\n }\n }\n ]\n }\n ],\n \"isActive\": true,\n \"externalCampaignId\": \"<string>\",\n \"isAutoTrigger\": false,\n \"position\": 1,\n \"walletId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"name": "Bola-Bola Ad campaign",
"marketplaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exclusivityPrice": 123,
"chargeType": "DAILY",
"adFormat": "exclusive_listing",
"vendorId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isActive": true,
"externalCampaignId": "<string>",
"isAutoTrigger": false,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "9999-12-31T22:59:59.999999Z",
"bidType": "exclusive",
"createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"position": 1,
"walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
A valid API key generated in Topsort's UI. Use the TSE API key if calling auctions or events API, otherwise use the TSC API key.
Query Parameters
The ID of the vendor.
1Body
The request body for creating an exclusive listing campaign.
The name of the campaign.
1"Bola-Bola Ad campaign"
When should the campaign start. If the start date is in the past, it will be set to the current date.
When should the campaign stop. Must be greater than start date.
The price to pay daily for the campaign to run.
An array of bids for this campaign.
1 elementShow child attributes
Show child attributes
Whether the campaign should be activated upon creation.The campaign will start when this is set and the start_date has passed.
The external ID of the campaign in the marketplace. Must be unique per marketplace and format combination.
Whether the campaign is auto-triggered.
The rank the ad will have in the auction
1 <= x <= 20The uuid of the wallet to be used with this campaign.
Response
Successful Response
Model that represents an Exclusive Listing Campaign.
The name of the campaign.
1"Bola-Bola Ad campaign"
The ID of the marketplace.
The ID of the campaign.
The price to pay daily for the campaign to run.
How exclusive campaigns are going to be charged, only daily is allowed.
DAILY The ad format of the campaign. Can be exclusive_listing.
"exclusive_listing""exclusive_listing"
The marketplace's ID of the vendor.
When was this campaign created.
When was this campaign last updated.
Whether the campaign should be activated upon creation.The campaign will start when this is set and the start_date has passed.
The external ID of the campaign in the marketplace.
Whether the campaign is auto-triggered.
The bidding type of the campaign.
"exclusive"The ID of the user creating the campaign.
The rank the ad will have in the auction
1 <= x <= 20The uuid of the wallet to be used with this campaign.
Was this page helpful?